<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf8"/>
		<title>个人资金管理系统</title>
		<link rel="stylesheet" type="text/css" href="<%=basePath%>css/index.css"/>
<script type="text/javascript" src="js/jquery-1.10.2.js"></script>
<script type="text/javascript">
 function clk_image(){
    var img = document.getElementById("CodeImg");   
    img.src = "random/code/generate.do?" + Math.random();
}  
</script>


</head>
	<body style="background:#000;">
	<%
    String username = "";
    String password = "";
    //获取当前站点的所有Cookie
    Cookie[] cookies = request.getCookies();
    for (int i = 0; i < cookies.length; i++) {
        if ("username".equals(cookies[i].getName())) {
            username = cookies[i].getValue();
        } else if ("password".equals(cookies[i].getName())) {
            password = cookies[i].getValue();
        }
    }
%>		
		<div class="png login_logo"><img src="<%=basePath%>images/logo_03.png" alt=""/></div>
		<form action="login" method="post" name="form1">
		<div class="login">
		<span style="color: red;"><b>${errorinfo}</b></span>
		<span style="color: red;"><b>${statement}</b></span>
			<div class="login_1"><input name="username" type="text"  value="<%=username%>" /></div>
			<div class="login_2"><input name="password" type="password"  value="<%=password%>" /></div>
			<div class="login_3"><input name="rember" type="checkbox" value="yes" name="rember" /></div>
			<div class="login_4 png"><input type="image" src="<%=basePath%>images/login_08.jpg" onclick="form1.submit" /></div>			
		</div>
		<center>	
		<span style="color:orange"><b>验证码:</b></span><input type="text" name="code" id="code" />
		<img id="CodeImg" src="random/code/generate.do?,Math.random();" onclick="clk_image();" />					               
		<span style="color: red;"><b>${codeinfo}</b></span>
		</center>
		</form>
	</body>
</html>

